<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>3-8 Vue中的列表渲染</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="app">
        <div v-for="(item,index) in list" :key="index">
            {{item}} -- {{index}}
        </div>

 <!--   yukai -- name -- 0
        18 -- age -- 1
        男 -- gender -- 2 
-->
        <div v-for="(item,key,index) of userinfo">
            {{item}} -- {{key}} -- {{index}}
        </div>
    </div>

    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                list: ["床前明月光", "疑是地上霜", "举头望明月", "低头思故乡"],
                userinfo: {
                    name: "yukai",
                    age: 18,
                    gender: "男"
                }
            }
        })
    </script>
</body>
<!-- js 常用函数 push()、pop()、shift()、unshift()、slice()、splice() 等
https://blog.csdn.net/u014212540/article/details/130887111 -->

</html>